﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="js/jquery.js"></script>

    <script type="text/javascript">
        function test() {
            $.ajax({
                //提交数据的类型 POST GET
                type: "POST",
                url: "http://localhost:60899/api/Values",
                //data: { "": "张丽" },
                data: { "": "张丽" },
                datatype: "json",//"xml", "html", "script", "json", "jsonp", "text".
                success: function (data) {
                    console.log(data);;
                },
                //调用执行后调用的函数
                complete: function (XMLHttpRequest, textStatus) {
                    alert(XMLHttpRequest.responseText);
                    alert(textStatus);
                    //HideLoading();
                },
                //调用出错执行的函数
                error: function () {
                    //请求出错处理
                }
            });

        }



    </script>
</head>
<body>

    <input type="button" onclick="test()" value="23456ty" style="width: 100px; height: 100px;" />

</body>
</html>
